//index.js
let app = getApp()
Page({
	data: {
		goodList: {},
		styles: [],
		dizhi: 'https://t.doule.shop/',
        product_id:'',
        height:''
	},
	onLoad: function(option) {
        app.globalData.show = true;
        let height = tt.getSystemInfoSync().windowHeight
        this.setData({
            height:height+'px'
        })
        this.data.product_id = option.product_id
        this.setData({
            product_id:this.data.product_id
        })
		let data = JSON.parse(option.data)
		let img_url = JSON.parse(option.img_url)
		let goodList = {
			data,
			img_url,
			product_id: option.product_id
		}
		this.setData({
			styles: JSON.parse(option.style),
			goodList:goodList
		})
	},
	shuXing(e) {
		// console.log(item)
		let item = e.currentTarget.dataset.id
		tt.navigateTo({
			url: '/pages/tmxq/tmxq?current=' + item + '&product_id=' + this.data.goodList.product_id,
		})
	}
})
